package com.shop.cloud.domain.hongfu;

import java.time.OffsetDateTime;
import java.util.Date;
import java.math.BigDecimal;
import java.sql.Timestamp;

import org.apache.commons.lang3.builder.ToStringBuilder;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.shop.cloud.common.mapper.OffsetDateTimeToIso8601Serializer;
import com.shop.cloud.common.mybatis.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 
 * points_history-points_history
 *
 */
@ToString
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class PointsHistory extends BaseEntity{

	private static final long serialVersionUID = 1L;
	
	public static final int POINT_TYPE_SIGN = 1;	// 1）每日签到：由签到获得，5积分/天（数值做活）
	public static final int POINT_TYPE_BUY = 2;	// 2）购买积分商品：购买积分商品
	public static final int POINT_TYPE_INVITE = 3;	// 3）邀请好友获得：邀请好友注册且登录成功
	public static final int POINT_TYPE_REGISTER = 4;	// 4）注册赠送：注册APP获得10积分
	public static final int POINT_TYPE_SYS_GIVE = 5;	// 5）系统赠送：后台系统给用户增加
	public static final int POINT_TYPE_SYS_DEDUCT = 6;	// 6）系统扣除：后台系统给用户减少
    
	/**
	 * 用户id号
	 */
	@ApiModelProperty(value = "用户id号")
	 private Long userId;
	/**
	 * 积分类型。
1）每日签到：由签到获得，5积分/天（数值做活）
2）购买积分商品：购买积分商品
3）邀请好友获得：邀请好友注册且登录成功
4）注册赠送：注册APP获得10积分
5）系统赠送：后台系统给用户增加
6）系统扣除：后台系统给用户减少
	 */
	@ApiModelProperty(value = "积分类型。1）每日签到：由签到获得，5积分/天（数值做活）2）购买积分商品：购买积分商品3）邀请好友获得：邀请好友注册且登录成功4）注册赠送：注册APP获得10积分5）系统赠送：后台系统给用户增加6）系统扣除：后台系统给用户减少")
	 private Integer type;
	/**
	 * 当前积分
	 */
	@ApiModelProperty(value = "当前积分")
	 private Integer currentPoints;
	/**
	 * 变动的积分
	 */
	@ApiModelProperty(value = "变动的积分")
	 private Integer changePoints;
	/**
	 * 发生时间
	 */
	@ApiModelProperty(value = "发生时间")		
	 private Timestamp createTime;
	
	/**
	 * 下线id号
	 */
	@ApiModelProperty(value = "下线id号，对于type=3有效")
	 private Long objUserId;
	
	@ApiModelProperty(value = "积分单号")
	 private String pointNo;
    
	
    public String getPointNo() {
		return pointNo;
	}

	public void setPointNo(String pointNo) {
		this.pointNo = pointNo;
	}

	public PointsHistory(){
    
    }
    
    public Long getUserId() {
        return this.userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Integer getType() {
        return this.type;
    }
    
    public void setType(Integer type) {
        this.type = type;
    }
    public Integer getCurrentPoints() {
        return this.currentPoints;
    }
    
    public void setCurrentPoints(Integer currentPoints) {
        this.currentPoints = currentPoints;
    }
    public Integer getChangePoints() {
        return this.changePoints;
    }
    
    public void setChangePoints(Integer changePoints) {
        this.changePoints = changePoints;
    }
    public Timestamp getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

	public Long getObjUserId() {
		return objUserId;
	}

	public void setObjUserId(Long objUserId) {
		this.objUserId = objUserId;
	}

}